package com.yunfei.springbootgoods.exceptionEnums;

public enum ExceptionEnum {

    ERROR_GOODS_LIST(201,"获取商品列表出错"),
    ERROR_CAR_LIST(202,"获取购物车列表出错"),
    ERROR_ORDER_LIST(203,"获取订单列表出错"),
    ERROR_CATEGORY_LIST(210,"获取分类列表出错"),

    ERROR_GOODS_ADD(204,"商品添加出错"),
    ERROR_GOODS_DELETE(205,"商品删除出错"),
    ERROR_GOODS_UPDATE(206,"商品更新出错"),

    ERROR_CAR_ADD(207,"加入购物车出错"),
    ERROR_CAR_DELETE(208,"购物车商品删除失败"),
    ERROR_ORDER_ADD(209,"加入订单出错"),

    ERROR_ORDER_UPDATE01(211,"支付订单出错"),
    ERROR_ORDER_UPDATE02(212,"取消订单出错")
    ;


    private Integer code;
    private String msg;

    ExceptionEnum() {
    }

    ExceptionEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    @Override
    public String toString() {
        return "ExceptionEnum{" +
                "code=" + code +
                ", msg='" + msg + '\'' +
                '}';
    }
}
